import { http } from '@/utils/http'
import type { LoginResult } from '@/types/user'

type LoginParams = {
  code: string,
  encryptedData: sring,
  iv: string
}
/**
 * 个人账号无法获取手机号
 */
export const userLoginApi= (data: LoginParams) => {
  return http<LoginResult>({
    method: 'POST',
    url: '/login/wxMin',
    data,
  })
}
/**
 * 模拟登录
 */
export const userLoginSimpleAPI = (phoneNumber: string) => {
  return http<LoginResult>({
    method: 'POST',
    url: '/login/wxMin/simple',
    data: {
      phoneNumber,
    },
  })
}